package org.hongrun.controller;

import com.alibaba.csp.sentinel.annotation.SentinelResource;
import org.hongrun.hander.HotspotBlockHandler;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HotspotController{


@GetMapping("/hotspot")
@SentinelResource(value = "getHotspotResource", blockHandler = "getHotspotBlockHandler",
        blockHandlerClass = HotspotBlockHandler.class)
public String getHotspot(@RequestParam(value = "type",required = false) String type,
                         @RequestParam(value = "size", required = false) String size) {
    System.out.println("访问");
    return " ";
}
}